from typing import Optional, Any, Dict
from pydantic import BaseModel


class Token(BaseModel):
    """
    令牌模式
    """
    access_token: str
    token_type: str


class TokenPayload(BaseModel):
    """
    令牌载荷模式
    """
    sub: Optional[str] = None
    exp: Optional[int] = None


class StandardResponse(BaseModel):
    """
    标准响应格式
    """
    code: int
    message: str
    data: Any = None
    timestamp: int


class TokenResponse(StandardResponse):
    """
    令牌响应模式
    """
    data: Optional[Token] = None